<template>
  <div>
    <p>接收父组件的值：{{ backName }}</p>
  </div>
</template>

<script setup>
import { onMounted, ref, inject, reactive } from 'vue';
import { useSetting } from '@/store/modules/setting'
const setting = useSetting()
const data = reactive({
  map: [113, 22]
})
const backName = ref('')
const getPersonInfo = inject('getPersonInfo')
onMounted(() => {
  getFatherData()
})
function getFatherData() {
  backName.value = getPersonInfo()
  console.log('接收父组件参数', getPersonInfo())
  console.log('返回', setting.version)
}
defineExpose({
  data
})
</script>

<style lang="scss" scoped>

</style>